package com.wanji.software.tocc.file.config;

import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author weixiaochun
 * @date 2023/12/28
 */
@Configuration
public class FlywayConfiguration {
    @Bean
    public FlywayMigrationStrategy flywayMigrationStrategy() {
        return flyway -> {
            org.flywaydb.core.api.configuration.Configuration configuration = flyway.getConfiguration();
            flyway.migrate();
        };
    }
}
